/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ces31.ChineseDicesClient.RN;

import ces31.ChineseDicesClient.IU.IU_Inicial_Observer;
import java.util.Iterator;
import java.util.LinkedList;
//
/**
 *
 * @author Anderson Aiziro
 */
public abstract class RN_SalaDeEspera_Subject {

    public void attach(IU_Inicial_Observer obs) {
        observers.add(obs);
    }

    public void dettach(IU_Inicial_Observer obs) {
        observers.remove(obs);
    }
    protected void notifyNewMessageToObservers(){
        Iterator currentobserver = observers.iterator();
        while(currentobserver.hasNext()){
            ((IU_Inicial_Observer)currentobserver.next()).apresentarMensagem();
        }
    }
     private LinkedList observers = new LinkedList();
}
